let arr = [1, [2, 3],
    [4, 5[6, 7]]
]
console.log(arr.flat());
// 参数代表被拍平的层级：
console.log(arr.flat(1));
console.log(arr.flat(4));